package com.iretailer.report.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.iretailer.report.base.SuperMapper;
import com.iretailer.report.model.FaceAlarmDevice;
import com.iretailer.report.model.FaceAlarmMall;
import com.iretailer.report.model.FaceAlarm;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Auther: xjw
 * @Date: 2019/11/14 0014 11:31
 * @Description:
 */
public interface FaceAlarmMapper extends SuperMapper<FaceAlarm> {
    IPage<FaceAlarmMall> selectPageFaceAlarmMall(Page page,@Param("ew") QueryWrapper queryWrapper);

    Integer batchInsertFaceAlarmDevice(@Param("faceAlarmId") Long faceAlarmId,@Param("deviceIds") List<Long> deviceIds);

    Integer deleteFaceAlarmDeviceByFaceAlarmId(@Param("faceAlarmId") Long faceAlarmId);

    List<Long> selectDidsByAlarmIds(@Param("faceAlarmIds") List<Long> ids);

    List<FaceAlarmDevice> getFaceAlarmDeviceByDeviceId(@Param("deviceId") String deviceId);
}
